import { defineComponent, toRefs, SetupContext } from 'vue'
import { LinkProps } from '@/types/props/LinkProps'

export default defineComponent({
  name: 'ELink',
  props: LinkProps,
  setup(props:LinkProps, context:SetupContext) {
    const { attrs } = context
    const { type, href } = toRefs(props)

    return () => (
      <a
        class={`e-link--${type}`}
        href={href}
        {...attrs}
      ></a>
    )
  }
})
